package com.ming.sportdemo.service.serviceImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ming.sportdemo.bean.Field;
import com.ming.sportdemo.dao.FieldDao;
import com.ming.sportdemo.service.FieldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FieldServiceImpl extends ServiceImpl<FieldDao, Field> implements FieldService {

    @Autowired
    FieldDao fieldDao;
    @Override
    public Field getFieldByMessage(String fieldName, String fieldLocation) {
        return fieldDao.getFieldByMessage(fieldName,fieldLocation);
    }


    @Override
    public List<Field> getAllField(String fieldName, String fieldLocation, int pageStart, int pageSize) {
        return fieldDao.getAllField(fieldName,fieldLocation,pageStart,pageSize);
    }

    @Override
    public int getFieldCounts(String fieldName) {
        return fieldDao.getFieldCounts(fieldName);
    }

    @Override
    public int addField(Field field) {
        return fieldDao.addField(field);
    }

    @Override
    public int deleteField(int fieldId) {
        return fieldDao.deleteField(fieldId);
    }

    @Override
    public Field getUpdateField(int fieldId) {
        return fieldDao.getUpdateField(fieldId);
    }

    @Override
    public int updateField(Field field) {
        return fieldDao.updateField(field);
    }

    @Override
    public Field getByName(String fieldName) {
        return fieldDao.getByName(fieldName);
    }

}
